Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: onBeforeRenderClient() (closes #110) #111

Merged
merged 3 commits into from
May 6, 2024

Conversation

crisberrios
Copy link
Contributor

This PR adds a custom hook onBeforeRenderClient, enabling custom logic to run before the render pass on the client side.

This addresses #110 and works the same as #96

It also includes a minimal example with async data fetching on the server side and store hydration on the client pass.

An additional change includes adding rimraf package to allow building on a Windows environment w/o having to resort to WSL or 3rd party CLI tools.

brillout added a commit to crisberrios/vike-react that referenced this pull request May 6, 2024
@brillout brillout changed the title Add onBeforeRenderClient custom hook feat: onBeforeRenderClient() (closes #110) May 6, 2024
@brillout brillout merged commit 68be831 into vikejs:main May 6, 2024
10 checks passed
@brillout
Copy link
Member

brillout commented May 6, 2024

I removed the example, but contribution welcome to create a community example under your name that showcases using vike-react with a well-known store (Redux, Zustand, ...) We can then add it to vike.dev.

I rebased and moved out the rimraf change to be a separate commit outside this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants